package com.google.android.exoplayer2.text.ttml;

import android.text.Layout.Alignment;
import o.amm;

public final class TtmlStyle {
    private int ʻ = -1;
    private int ʼ = -1;
    private int ʽ = -1;
    private boolean ˊ;
    private boolean ˋ;
    private String ˋॱ;
    private int ˎ;
    private int ˏ;
    private float ˏॱ;
    private Alignment ͺ;
    private String ॱ;
    private TtmlStyle ॱˊ;
    private int ॱॱ = -1;
    private int ᐝ = -1;

    public int ˊ() {
        int i = 0;
        if (this.ʻ == -1 && this.ʼ == -1) {
            return -1;
        }
        int i2 = this.ʻ == 1 ? 1 : 0;
        if (this.ʼ == 1) {
            i = 2;
        }
        return i2 | i;
    }

    public boolean ˏ() {
        return this.ॱॱ == 1;
    }

    public TtmlStyle ˎ(boolean z) {
        boolean z2;
        int i = 1;
        if (this.ॱˊ == null) {
            z2 = true;
        } else {
            z2 = false;
        }
        amm.ˏ(z2);
        if (!z) {
            i = 0;
        }
        this.ॱॱ = i;
        return this;
    }

    public boolean ˋ() {
        return this.ᐝ == 1;
    }

    public TtmlStyle ˋ(boolean z) {
        boolean z2;
        int i = 1;
        if (this.ॱˊ == null) {
            z2 = true;
        } else {
            z2 = false;
        }
        amm.ˏ(z2);
        if (!z) {
            i = 0;
        }
        this.ᐝ = i;
        return this;
    }

    public TtmlStyle ˊ(boolean z) {
        boolean z2;
        int i = 1;
        if (this.ॱˊ == null) {
            z2 = true;
        } else {
            z2 = false;
        }
        amm.ˏ(z2);
        if (!z) {
            i = 0;
        }
        this.ʻ = i;
        return this;
    }

    public TtmlStyle ˏ(boolean z) {
        boolean z2;
        int i = 1;
        if (this.ॱˊ == null) {
            z2 = true;
        } else {
            z2 = false;
        }
        amm.ˏ(z2);
        if (!z) {
            i = 0;
        }
        this.ʼ = i;
        return this;
    }

    public String ॱ() {
        return this.ॱ;
    }

    public TtmlStyle ˊ(String str) {
        amm.ˏ(this.ॱˊ == null);
        this.ॱ = str;
        return this;
    }

    public int ˎ() {
        if (this.ˊ) {
            return this.ˏ;
        }
        throw new IllegalStateException("Font color has not been defined.");
    }

    public TtmlStyle ˏ(int i) {
        amm.ˏ(this.ॱˊ == null);
        this.ˏ = i;
        this.ˊ = true;
        return this;
    }

    public boolean ʻ() {
        return this.ˊ;
    }

    public int ʽ() {
        if (this.ˋ) {
            return this.ˎ;
        }
        throw new IllegalStateException("Background color has not been defined.");
    }

    public TtmlStyle ˋ(int i) {
        this.ˎ = i;
        this.ˋ = true;
        return this;
    }

    public boolean ॱॱ() {
        return this.ˋ;
    }

    public TtmlStyle ॱ(TtmlStyle ttmlStyle) {
        return ˏ(ttmlStyle, true);
    }

    private TtmlStyle ˏ(TtmlStyle ttmlStyle, boolean z) {
        if (ttmlStyle != null) {
            if (!this.ˊ && ttmlStyle.ˊ) {
                ˏ(ttmlStyle.ˏ);
            }
            if (this.ʻ == -1) {
                this.ʻ = ttmlStyle.ʻ;
            }
            if (this.ʼ == -1) {
                this.ʼ = ttmlStyle.ʼ;
            }
            if (this.ॱ == null) {
                this.ॱ = ttmlStyle.ॱ;
            }
            if (this.ॱॱ == -1) {
                this.ॱॱ = ttmlStyle.ॱॱ;
            }
            if (this.ᐝ == -1) {
                this.ᐝ = ttmlStyle.ᐝ;
            }
            if (this.ͺ == null) {
                this.ͺ = ttmlStyle.ͺ;
            }
            if (this.ʽ == -1) {
                this.ʽ = ttmlStyle.ʽ;
                this.ˏॱ = ttmlStyle.ˏॱ;
            }
            if (z && !this.ˋ && ttmlStyle.ˋ) {
                ˋ(ttmlStyle.ˎ);
            }
        }
        return this;
    }

    public TtmlStyle ˋ(String str) {
        this.ˋॱ = str;
        return this;
    }

    public String ʼ() {
        return this.ˋॱ;
    }

    public Alignment ᐝ() {
        return this.ͺ;
    }

    public TtmlStyle ॱ(Alignment alignment) {
        this.ͺ = alignment;
        return this;
    }

    public TtmlStyle ˎ(float f) {
        this.ˏॱ = f;
        return this;
    }

    public TtmlStyle ˊ(int i) {
        this.ʽ = i;
        return this;
    }

    public int ˏॱ() {
        return this.ʽ;
    }

    public float ॱˊ() {
        return this.ˏॱ;
    }
}
